// Functions associated with the UserInterface class
//-----------------

//-----------------
// Includes libraries and other files
#include "UserInterface.h"

//-----------------

//-----------------
//// CONSTRUCTOR - UserInterface
UserInterface::UserInterface( LPDIRECT3DDEVICE9 device, Window* window)
	: text_( device, 20, 0), device_( device), p_window_( window)
{}
//-----------------

//-----------------
//// FUNCTION - render_text
// output the text at the specified location in a certain colour
void UserInterface::render_text( const std::string& t, const int& x, const int& y, const int& a, const int& r, const int& g, const int& b) {
	text_.render( t.c_str(), x, y, (t.length()*CHAR_WIDTH), CHAR_HEIGHT, a, r, g, b);
}

//// FUNCTION - render_text
// output the button
void UserInterface::render_text( const Button& b) {
	text_.render(	b.get_text().c_str(),
					b.get_x_pos(),
					b.get_y_pos(),
					b.get_rect_width(),
					b.get_rect_height(),
					b.get_colour_alpha(),
					b.get_colour_red(),
					b.get_colour_blue(),
					b.get_colour_green());
}